import java.util.*;

public class day1 {
    /**
     * 哈希表 + 双指针
     * 对称之美
     * https://ac.nowcoder.com/acm/problem/214850
     */
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        while(t-- != 0) {
            int n = in.nextInt();
            // 使用 boolean 二维数组进行记录 某个字符串 中每个字符是否出现过
            // 存在 n个 字符串，每个字符串进行判断26个字符
            boolean[][] hash = new boolean[n][26];
            for(int i = 0;i < n;i++) {
                char[] s = in.next().toCharArray();
                for(char ch : s) {
                    hash[i][ch - 'a'] = true;
                }
            }
            // 初始化哈希表结束，之后使用双指针，进行判断是否可以形成 回文字符串
            int left = 0,right = n - 1;
            while(left < right) {
                if(!check(hash,left,right)) {
                    break;
                }else {
                    left++;
                    right--;
                }
            }

            if(left < right) {
                System.out.println("No");
            }else {
                System.out.println("Yes");
            }
        }
    }

    public static boolean check(boolean[][] hash,int left,int right) {
        for(int i = 0;i < 26;i++) {
            if(hash[left][i] && hash[right][i]) {
                return true;
            }
        }
        return false;
    }



    /**
     * 动态规划
     * JZ47 礼物的最大价值
     * https://www.nowcoder.com/practice/2237b401eb9347d282310fc1c3adb134?tpId=265&tqId=39288&ru=/exam/oj
     */
    public int maxValue (int[][] grid) {
        // write code here
        int n = grid.length;
        int m = grid[0].length;

        int[][] dp = new int[n + 1][m + 1];
        for(int i = 1;i <= n;i++) {
            for(int j = 1;j <= m;j++) {
                dp[i][j] = Math.max(dp[i - 1][j],dp[i][j - 1]) + grid[i - 1][j - 1];
            }
        }
        return dp[n][m];
    }


    /**
     * 模拟
     * WY3 小易的升级之路
     * https://www.nowcoder.com/practice/fe6c73cb899c4fe1bdd773f8d3b42c3d?tpId=122&tqId=33649&ru=/exam/oj
     */
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextInt()) {
            int n = in.nextInt();
            int a = in.nextInt();
            while(n-- != 0) {
                int b = in.nextInt();
                if(b <= a) {
                    a += b;
                }else {
                    a += gcd(a,b);
                }
            }
            System.out.println(a);
        }
    }

    public static int gcd(int a,int b) {
        // 得到最大公约数
        if(b == 0) {
            return a;
        }
        return gcd(b,a % b);
    }
}
